﻿@namespace BootstrapBlazor.Components
@inherits IdComponentBase

<div @attributes="@AdditionalAttributes" class="@ClassString">
    @if (HeaderTemplate != null || !string.IsNullOrEmpty(HeaderText))
    {
        <div class="card-header">
            @if (IsCollapsible)
            {
                <div class="card-collapse" data-bs-toggle="collapse" data-bs-target="#@Id" aria-expanded="@ExpandedString">
                    <i class="@ArrowClassString"></i>
                    <div class="card-collapse-body">
                        @RenderHeader
                    </div>
                </div>
            }
            else
            {
                @RenderHeader
            }
        </div>
    }
    <div class="@BodyClassName" id="@Id">
        @BodyTemplate
    </div>
    @if (FooterTemplate != null)
    {
        <div class="@FooterClassName">
            @FooterTemplate
        </div>
    }
</div>
